package bc.config;

import bc.model.Card;
import bc.model.Cards;
import bc.model.HtmlContext;

import bc.controller.StageResizeAction;
import bc.controller.Launcher;
import bc.controller.CardsLayoutComputer;
import bc.controller.CardsLayoutController;

import bc.view.WebsitePresenter;
import bc.view.CardPresenter;
import bc.view.CardPresenter1;
import bc.view.CardPresenter2;

import js.Lib;
import js.Dom;

import haxe.rtti.Infos;

class Config implements Infos
{
	public var htmlContext : HtmlContext;
	
	public var cards : Cards;
	
	public var websitePresenter : WebsitePresenter;
	
	public var stageResizeAction : StageResizeAction;
	
	public var cardsLayoutComputer : CardsLayoutComputer;
	
	public var launcher : Launcher;
	
	public var cardsLayoutController : CardsLayoutController;
	
	public var cardPresenters : Array<CardPresenter>;
	
	public function new()
	{
		htmlContext = new HtmlContext();
		htmlContext.contentDiv = Lib.document.getElementById("content");
		
		cards = new Cards();
		cards.cardWidth = 300;
		cards.cardHeight = 200;
		cards.margin = -10;
		
		var card : Card;
		
		card = new Card();
		card.index = 0;
		card.name = "Card 1";
		card.image = "image/color.png";
		cards.all.push(card);
		
		card = new Card();
		card.index = 1;
		card.name = "Card 2";
		card.image = "image/bw.jpg";
		cards.all.push(card);
		
		card = new Card();
		card.index = 2;
		card.name = "Card 3";
		card.image = "image/color.png";
		cards.all.push(card);
		
		cards.selected = cards.all[0];
		
		websitePresenter = new WebsitePresenter();
		
		cardPresenters = new Array<CardPresenter>();
		cardPresenters[0] = new CardPresenter2();
		cardPresenters[1] = new CardPresenter2();
		cardPresenters[2] = new CardPresenter2();
		
		stageResizeAction = new StageResizeAction();
		launcher = new Launcher();
		cardsLayoutComputer = new CardsLayoutComputer();
		cardsLayoutController = new CardsLayoutController();
	}
}